/**
 * @file   main1.cpp
 * @author Shao <student@student>
 * @date   Tue Dec 28 22:09:59 2021
 * 
 * @brief  
 * 
 * 
 */

#include "Graph.h"

int main() {
  int vexnum; int edge;
  time_t first,second;

  cout << "输入图的顶点个数和边的条数" << endl;
  cin >> vexnum >> edge;
  Graph graph(vexnum, edge);
  first = clock();
  graph.createGraph();
  second  = clock();
  cout << "createGraph所需的时间为:" << (double)(second - first) / CLOCKS_PER_SEC << endl;
  first = clock();
  graph.print();
  second  = clock();
  cout << "print邻接矩阵所需的时间为:" << (double)(second - first) / CLOCKS_PER_SEC << endl;
  first = clock();
  graph.Dijkstra(1);
  graph.print_path(1);
  second  = clock();
  cout << "Dijkstra算法求最短路径所需的时间为:" << (double)(second - first) / CLOCKS_PER_SEC << endl;
  return 0;
}
